// Utilities
import { defineStore } from "pinia";
import { getMaterialCategory as getMaterialCategoryApi } from "@/api/material";
export const useAppStore = defineStore("app", {
  state: () => ({
    materialCategory: [],
    activeMaterialCategory: null,

    //
  }),
  actions: {
    setMaterialCategory(data) {
      this.materialCategory = data;
    },
    async getMaterialCategory(params) {
      const { data } = await getMaterialCategoryApi();
      this.setMaterialCategory(data);
      return data;
    },
  },
});
